﻿@model FILSTARTUPS_MOBILE.Models.ProfilePage

@{
    ViewBag.Title = "EditProfile";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


@section Nav
{
    @foreach (var nav in Model.PageNav)
    {
        <li>@Html.ActionLink(nav.pagename, "Page" , new { pageidPK=nav.pageidPK, pagename=nav.pagename })</li>
    }
}


<h2>EditProfile</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@*@using (Html.BeginForm("EditProfile", "Profile", FormMethod.Post, new {enctype = "multipart/form-data", data-ajax=false}))  
{*@
<form enctype="multipart/form-data" data-ajax="false" method=post>
    @Html.ValidationSummary(true)
    <fieldset>

        @Html.HiddenFor(model => model.profile.profileidPK)

            <div class="editor-label">
                Upload Picture
          </div>

          <div class="editor-field">
              <input type="file" name ="postedFile" id="postedFile" />
          </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.profile.firstname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.profile.firstname)
            @Html.ValidationMessageFor(model => model.profile.firstname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.profile.lastname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.profile.lastname)
            @Html.ValidationMessageFor(model => model.profile.lastname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.profile.middlename)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.profile.middlename)
            @Html.ValidationMessageFor(model => model.profile.middlename)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model =>  model.profile.birthdate)
        </div>
        <div class="editor-field">
            <input type="text" name="birthdate" id="birthdate" value="@Model.profile.birthdate.ToString("dd MMM yyyy")" />
            @Html.ValidationMessageFor(model => model.profile.birthdate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.profile.gender)
        </div>
        <div class="editor-field">
            <select name="gender">
                <option value="male">Male</option>
                <option value="female">Female</option>
            </select>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.profile.phonenumber)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.profile.phonenumber)
            @Html.ValidationMessageFor(model => model.profile.phonenumber)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.profile.citizenship)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.profile.citizenship)
            @Html.ValidationMessageFor(model => model.profile.citizenship)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.profile.activitiesAndinterest)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.profile.activitiesAndinterest)
            @Html.ValidationMessageFor(model => model.profile.activitiesAndinterest)
        </div>

      

        <p>
              <div data-role="controlgroup" data-type="horizontal">
            <input type="submit" data-inline="true" value="Save" />
            <a href="Index" data-role="button" >Cancel</a>
            </div>
        </p>
    </fieldset>

</form>

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
